package face.pay.cpn.mchinfo.api;

import face.pay.cpn.mchinfo.service.IGetMchInfoService;
import face.pay.cpn.utils.response.ResponseMessage;
import face.pay.cpn.mchinfo.service.INewMchListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 *
 */
@RequestMapping("mchInfo")
@Controller
public class ApiMchInfo {


    @Autowired
    private INewMchListService iNewMchListService;


    @Autowired
    private IGetMchInfoService iGetMchInfoService;


    @ResponseBody
    @RequestMapping("index")
    public String Index() {
        return "hello world !";
    }


    @ResponseBody
    @PostMapping("queryNewMchList")
    public ResponseMessage queryNewMchList(@RequestBody String jsonData) {
        return this.iNewMchListService.queryNewMchList(jsonData);
    }


    @ResponseBody
    @PostMapping("getMchInfo")
    public ResponseMessage getMchInfo(@RequestBody String jsonData) {
        return this.iGetMchInfoService.getMchInfo(jsonData);
    }
}
